package com.candy.dao.impl;

import com.candy.dao.AccountDao;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Repository;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

@Repository(value = "accountDao")
@Scope(value = "singleton")
public class AccountDaoImpl implements AccountDao {
    @Override
    public void save() {
        System.out.println("保存成功");
    }
    @PostConstruct
    public void startMethod(){
        System.out.println("初始化方法");
    }
    @PreDestroy
    public void endMethod(){
        System.out.println("销毁方法");
    }


}
